home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Macintosh Memory
/
HeapZone.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
646b
|
35 lines
// HeapZone.cp
#ifndef HeapZone_h
#include "HeapZone.h"
#endif
#ifndef MemoryError_h
#include "MemoryError.h"
#endif
HeapZone& HeapZone::Application()
{
static HeapZone& applicationZone( Bless( ApplicationZone() ) );
return applicationZone;
}
HeapZone& HeapZone::System()
{
static HeapZone& systemZone( Bless( SystemZone() ) );
return systemZone;
}
HeapZone& HeapZone::ZoneOfPointer( void *p )
{
THz result = PtrZone( (Ptr)p );
MemoryError::ThrowCurrent();
return Bless( result );
}
HeapZone& HeapZone::ZoneOfHandle( Handle h )
{
THz result = HandleZone( h );
MemoryError::ThrowCurrent();
return Bless( result );
}